/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dabarobjects.mobile.database.types;

import com.dabarobjects.mobile.utils.madex.MadexParserUtils;
import java.util.Date;

/**
 *
 * @author DabarObjects Solutions Limited (www.dabarobjects.com)
 */
public class DateObjectNotationParser extends AbstractMadexObjectNotationParser{

    public final static String KEY = "dt";

    
    public String getObjectTypeKey() {
        return KEY;
    }

    public Object parseObject(String dump) {
        return MadexParserUtils.stringToTime(dump);
    }

    public String notateObject(Object obj) {
        return MadexParserUtils.dateAsString((Date) obj);
    }

}
